package com.example.demo.util;


import com.example.demo.dao.pojo.UserInfo;

public class UserThreadLocal {

    private UserThreadLocal(){}

    private static final ThreadLocal<UserInfo> LOCAL = new ThreadLocal<>();

    public static void put(UserInfo userInfo){
        LOCAL.set(userInfo);
    }

    public static UserInfo get(){
        return LOCAL.get();
    }

    public static void remove(){
        LOCAL.remove();
    }
}
